package com.betty.cscams.service;

import com.betty.cscams.entity.SysFile;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface SysFileService {

    void importExecl(MultipartFile file, Long termId, int type) throws Exception;

    int save(MultipartFile file, Long busiId,Integer type) throws Exception;

    List<SysFile> findList(Long busiId,Integer type);

    void download(String path, String name, HttpServletRequest request, HttpServletResponse response) throws IOException;

    int delete(SysFile  records);

    String uploadImg(MultipartFile file) throws Exception;
    
    /**
     * 通用Excel导入方法，将Excel数据导入到指定的Bean类
     * @param file Excel文件
     * @param clazz 目标Bean类
     * @param <T> Bean类型
     * @return 导入的数据列表
     * @throws Exception 导入异常
     */
    <T> List<T> importExcelForBean(MultipartFile file, Class<T> clazz) throws Exception;
}
